FROM python:3.8

LABEL Author="Bingal<github.com/bingal>"
ENV LANG C.UTF-8 LC_ALL=C.UTF-8

WORKDIR /data/

#依赖层
COPY requirements.txt .
RUN pip3 install -r requirements.txt --no-cache-dir --index-url=https://mirrors.aliyun.com/pypi/simple/ 
RUN mkdir /root/.u2net
RUN mkdir /data/temp
COPY ./model/u2net.pth /root/.u2net

#代码层
COPY ./web .
ENTRYPOINT  ["python3", "app.py"]
#ENTRYPOINT  ["gunicorn", "--bind", "127.0.0.1:8080", "--worker-class", "gevent", "app:app"]


#部署端口
EXPOSE 8080